package work.mediway.mdm.biz.entity.biz;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2022/7/11
 */
@ApiModel(value = "数据质量配置")
@Data
@TableName(value = "SS_Data_Quality_Config")
public class SsDataQualityConfig implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Integer id;

    /**
     * 源系统Code
     */
    @TableField(value = "source_access_system_id")
    @ApiModelProperty(value = "源系统id")
    private String sourceAccessSystemId;

    @TableField(exist = false)
    @ApiModelProperty(value = "源系统名称", hidden = true)
    private String sourceAccessSystem;

    /**
     * 源系统源系统模式
     */
    @TableField(value = "source_schema_name")
    @ApiModelProperty(value = "源系统模式名称")
    private String sourceSchemaName;

    /**
     * 源系统表名称
     */
    @TableField(value = "source_table_code")
    @ApiModelProperty(value = "源系统表名称")
    private String sourceTableCode;

    /**
     * 源系统表描述
     */
    @TableField(value = "source_table_desc")
    @ApiModelProperty(value = "源系统表描述")
    private String sourceTableDesc;

    /**
     * 目标系统Code
     */
    @TableField(value = "target_access_system_id")
    @ApiModelProperty(value = "目标系统id", required = true)
    private String targetAccessSystemId;

    @TableField(exist = false)
    @ApiModelProperty(value = "目标系统", hidden = true)
    private String targetAccessSystem;

    /**
     * 目标系统源系统模式
     */
    @TableField(value = "target_schema_name")
    @ApiModelProperty(value = "目标系统模式名称")
    private String targetSchemaName;

    /**
     * 目标系统表名称
     */
    @TableField(value = "target_table_code")
    @ApiModelProperty(value = "目标系统表名称", required = true)
    private String targetTableCode;

    /**
     * 目标系统表名称
     */
    @TableField(value = "target_table_desc")
    @ApiModelProperty(value = "目标系统表描述")
    private String targetTableDesc;

    /**
     * 目标表时间戳字段
     */
    @TableField(value = "target_timestamp")
    @ApiModelProperty(value = "目标表时间戳字段")
    private String targetTimestamp;

    /**
     * 更新时间
     */
    @TableField(value = "update_date")
    @ApiModelProperty(value = "更新时间", hidden = true)
    private String updateDate;

    /**
     * 更新人
     */
    @TableField(value = "update_user")
    @ApiModelProperty(value = "更新人", hidden = true)
    private String updateUser;

    /**
     * 内容比对周期
     */
    @TableField(value = "content_comparison_cycle")
    @ApiModelProperty(value = "内容比对周期")
    private Long contentComparisonCycle;

    @TableField(exist = false)
    @ApiModelProperty(value = "内容比对周期描述")
    private String contentComparisonCycleDesc;

    /**
     * 数量比对周期
     */
    @TableField(value = "number_comparison_cycle")
    @ApiModelProperty(value = "数量比对周期")
    private Long numberComparisonCycle;

    @TableField(exist = false)
    @ApiModelProperty(value = "数量比对周期描述")
    private String numberComparisonCycleDesc;

    /**
     * 任务日期范围，1：昨天，7：7天，14：14天，30：30天
     */
    @TableField(value = "task_date_range")
    @ApiModelProperty(value = "任务日期范围，1：昨天，7：7天，14：14天，30：30天")
    private String taskDateRange;

    @TableField(exist = false)
    @ApiModelProperty(value = "配置详情")
    private List<SsDataQualityConfigItem> dataQualityConfigItems;

    @TableField(exist = false)
    @ApiModelProperty(value = "比对信息", hidden = true)
    private List<SsDataQualityLog> dataQualityLogs;

    @TableField(exist = false)
    @ApiModelProperty(value = "未映射字段")
    private List<SsDataQualityMapping> dataQualityMappings = CollUtil.newArrayList();

}